package StudyCode.summary.mycollection;

import java.util.ArrayList;
import java.util.List;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class RemoveArrayItem {
	public final static Integer[] removeArrayItem(Integer[] array, Integer item) {
		List<Integer> list = new ArrayList<Integer>();
		for (Integer arrayItem : array) {
			if (!arrayItem.equals(item))
				list.add(arrayItem);
		}

		Integer[] ret = new Integer[list.size()];
		list.toArray(ret);
		return ret;
	}
}
